<template>
  <el-row :gutter="10">
    <el-col :span="10">
      <el-input
        :value="model.label"
        placeholder="请输入key"
        @input="inputLabel"
      />
    </el-col>
    <el-col :span="10">
      <el-input
        :value="model.value"
        placeholder="请输入value"
        @input="inputValue"
      />
    </el-col>
    <el-col :span="2">
      <i
        class="text-danger cursor-pointer el-icon-remove-outline"
        @click="remove"
      />
    </el-col>
  </el-row>
</template>
<script>
/* eslint-disable */
/**
 * @Method dict
 * @Description TODO
 * @Date 2021/1/20 11:14
 * @Created by HePing
 */
export default {
  name: "VeDict",

  model: {
    prop: "model",
  },
  props: {
    model: {
      type: Object,
      default() {
        return { label: "", value: "" };
      },
    },
  },
  methods: {
    inputLabel(label) {
      this.$emit("input", { ...this.model, label });
    },
    inputValue(value) {
      this.$emit("input", { ...this.model, value });
    },
    remove() {
      this.$emit("remove", 1);
    },
  },
};
</script>
<style lang="scss" scoped>
.ve-dict {
  ::v-deep {
    .mb10 {
      margin-bottom: 10px;
    }
    .mb18 {
      margin-bottom: 18px;
    }
  }
}
</style>
